var ML = new MultiLineEditor();

function MLPopup(sid) {
        var w = 500, h = 300,
        move = screen ?  ',left=' + ((screen.width - w) >> 1) + ',top=' + ((screen.height - h) >> 1) : '',
        o_mlWin = window.open('ml_new.php?sid='+sid, 'pastebox', "help=no,status=no,scrollbars=no,resizable=no" + move + ",width=" + w + ",height=" + h + ",dependent=yes", true);
        o_mlWin.opener = window;
        o_mlWin.focus();
}

function MultiLineEditor() {
        this.show = document.layers ?
                function (div) { this.divs[div].visibility = 'show' } :
                function (div) { this.divs[div].visibility = 'visible' };
        this.hide = document.layers ?
                function (div) { this.divs[div].visibility = 'hide' } :
                function (div) { this.divs[div].visibility = 'hidden' };
        // event handlers
        this.popup   = MLPopup;
}

